
R3F_FNCT_CreateObjects = {
	private ["_count","_i","_ar","_countar","_item","_veh","_pos","_dir","_side","_grp","_name","_code"];
	_count = count _this;
	for [{_i = 0},{_i < _count},{_i = _i + 1}] do {
		_ar = _this select _i;
		if (typeName _ar != "ARRAY") exitWith {};
		_countar = count _ar;
		_item = _ar select 2;
		_pos = _ar select 0;
		if (typeName _pos != "ARRAY") exitWith {};
		if (typeName _item == "STRING") then {
			_veh = createVehicle [_item,_pos,[],0,"NONE"];
		} else {
			_veh = _item;
		};
		if (typeName _veh != "OBJECT") exitWith {};
		_veh setPosATL _pos;
		_dir = _ar select 1;
		if (typeName _dir != "SCALAR") exitWith {};
		_veh setDir _dir;
		if (_countar > 3) then {
			_side = _ar select 3;
			if (typeName _side == "SIDE") then {
				_grp = createGroup _side;
				[_veh,_grp,false] call bis_fnc_spawncrew;
			};
		};
		if (_countar > 4) then {
			_name = _ar select 4;
			if ((typeName _name == "STRING") && (_name != "")) then {
				_veh call compile format ["%1 = _this;publicVariable ""%1""",_ar select 4];
			};
		};
		if (_countar > 5) then {
			_code = _ar select 5;
			if ((typeName _code == "STRING") && (_code != "")) then {
				_veh call compile format [_code];
			};
		};
		sleep 0.5;
	};
};
